package com.huabo.weixin.model;

/**
 * 扫描带参数二维码事件，
 * 关注/取消关注事件
 * 接收消息
 * Created by Jackie Liu on 2017/8/25.
 */
public class WXAcceptEventMessage {

    //开发者微信号
    private String toUserName;
    //发送方帐号（一个OpenID）
    private String fromUserName;
    //消息创建时间 （整型）
    private long createTime;
    //消息类型：event
    private String msgType;
    //关注/取消关注事件:事件类型，subscribe(订阅)、unsubscribe(取消订阅)
    //扫描带参数二维码事件:1 用户已关注时的事件推送 SCAN,2 用户未关注时，进行关注后的事件推送 subscribe
    private String event;
    //事件KEY值，qrscene_为前缀，后面为二维码的参数值
    private String eventKey;
    //二维码的ticket，可用来换取二维码图片
    private String ticket;

    public String getToUserName() {
        return toUserName;
    }

    public void setToUserName(String toUserName) {
        this.toUserName = toUserName;
    }

    public String getFromUserName() {
        return fromUserName;
    }

    public void setFromUserName(String fromUserName) {
        this.fromUserName = fromUserName;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public String getMsgType() {
        return msgType;
    }

    public void setMsgType(String msgType) {
        this.msgType = msgType;
    }

    public String getEvent() {
        return event;
    }

    public void setEvent(String event) {
        this.event = event;
    }

    public String getEventKey() {
        return eventKey;
    }

    public void setEventKey(String eventKey) {
        this.eventKey = eventKey;
    }

    public String getTicket() {
        return ticket;
    }

    public void setTicket(String ticket) {
        this.ticket = ticket;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("WXAcceptEventMessage{");
        sb.append("toUserName='").append(toUserName).append('\'');
        sb.append(", fromUserName='").append(fromUserName).append('\'');
        sb.append(", createTime=").append(createTime);
        sb.append(", msgType='").append(msgType).append('\'');
        sb.append(", event='").append(event).append('\'');
        sb.append(", eventKey='").append(eventKey).append('\'');
        sb.append(", ticket='").append(ticket).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
